Skip to content

docs: add NebulaGraph migration proposal artifacts#40

Open
parkermeng2024 wants to merge 26 commits into
iMoonLab:mainfrom
parkermeng2024:migrate-nebulagraph-hypergraph-storage
Open

docs: add NebulaGraph migration proposal artifacts#40
parkermeng2024 wants to merge 26 commits into
iMoonLab:mainfrom
parkermeng2024:migrate-nebulagraph-hypergraph-storage

Conversation

@parkermeng2024

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a substantial set of NebulaGraph hypergraph migration/validation artifacts and wiring to support selecting a NebulaGraph-backed BaseHypergraphStorage implementation behind an explicit “validated serving” gate, alongside documentation/spec artifacts and Web UI settings persistence improvements.

Changes:

  • Add NebulaGraph modules (config/IDs/schema/client/storage/migration/validation) plus a schema-check CLI and extensive unit test coverage.
  • Wire HyperRAG backend selection to enable NebulaGraph serving only when explicitly configured and validated; pass Web UI settings through as addon_params.
  • Add rollout documentation + OpenSpec proposal/design/tasks artifacts, and add nebula3-python as a dependency.

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web-ui/backend/settings_helpers.py Adds helper to merge incoming settings with existing settings while preserving masked API keys and unknown keys.
web-ui/backend/requirements.txt Adds nebula3-python dependency for backend environment.
web-ui/backend/main.py Wires settings merge on save, adds backend-mode settings, adjusts defaults, and exposes backend diagnostics in status.
tests/test_webui_settings_helpers.py Unit tests for settings merge behavior (masked apiKey, unknown keys, NebulaGraph fields).
tests/test_nebulagraph_validation.py Async tests for storage parity reporting and mismatch handling.
tests/test_nebulagraph_storage.py Adapter semantics tests for NebulaHypergraphStorage.
tests/test_nebulagraph_schema.py Tests for required schema DDL fragments and space statement generation.
tests/test_nebulagraph_retrieval_validation.py Tests RetrievalParityResult.passed() threshold logic.
tests/test_nebulagraph_migration.py Tests HGDB snapshot loading and idempotent migration semantics.
tests/test_nebulagraph_ids.py Tests canonical ID hashing and deterministic id_set normalization.
tests/test_nebulagraph_config.py Tests backend mode parsing, validation gating, and config coercion.
tests/test_nebulagraph_client.py Tests fake NebulaGraph client statement recording/availability.
tests/test_nebulagraph_cli.py Tests schema-check CLI parser/behavior and placeholder commands.
tests/test_nebulagraph_backend_selection.py Tests that serving selection is gated behind validation (incl. addon_params override).
scripts/hyperrag_nebulagraph.py Adds CLI entrypoint (schema-check implemented; migrate/validate placeholders).
requirements.txt Adds nebula3-python dependency for root environment.
openspec/config.yaml Adds OpenSpec config scaffold.
openspec/changes/migrate-hypergraph-storage-to-nebulagraph/tasks.md Adds migration task checklist artifact.
openspec/changes/migrate-hypergraph-storage-to-nebulagraph/specs/nebulagraph-hypergraph-storage/spec.md Adds spec-driven requirements for NebulaGraph migration/validation/rollout.
openspec/changes/migrate-hypergraph-storage-to-nebulagraph/proposal.md Adds high-level migration proposal artifact.
openspec/changes/migrate-hypergraph-storage-to-nebulagraph/design.md Adds detailed design decisions and rollout plan artifact.
openspec/changes/migrate-hypergraph-storage-to-nebulagraph/.openspec.yaml Declares OpenSpec change metadata.
hyperrag/nebulagraph_validation.py Implements storage parity comparison + retrieval parity result primitive.
hyperrag/nebulagraph_storage.py Provides in-memory NebulaGraph-backed BaseHypergraphStorage semantics (adapter scaffold).
hyperrag/nebulagraph_schema.py Defines required schema DDL statements and space-statement helper.
hyperrag/nebulagraph_migration.py Implements .hgdb snapshot loader and migration helpers (sync/async).
hyperrag/nebulagraph_ids.py Implements canonical entity/hyperedge VIDs and stable normalization/hashing.
hyperrag/nebulagraph_config.py Implements backend-mode resolution, NebulaGraph settings parsing, and coercion logic.
hyperrag/nebulagraph_client.py Defines client protocol and test fake implementation.
hyperrag/hyperrag.py Adds backend storage-class resolution gated by validated NebulaGraph serving.
docs/superpowers/plans/2026-06-10-nebulagraph-hypergraph-storage.md Adds detailed implementation plan document for the NebulaGraph rollout.
docs/nebulagraph-hypergraph-storage.md Adds operator-facing rollout documentation and current limitations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web-ui/backend/main.py
Comment on lines +40 to +47
def _load_settings_defaults():
if not os.path.exists(SETTINGS_FILE):
return {}
try:
with open(SETTINGS_FILE, 'r', encoding='utf-8') as f:
return json.load(f)
except Exception:
return {}
Comment thread web-ui/backend/main.py
Comment on lines 543 to 545
embedding_func=EmbeddingFunc(
embedding_dim=embedding_dim, # text-embedding-3-small 的维度
max_token_size=8192,
Comment thread web-ui/backend/main.py
Comment on lines +274 to +275
embeddingModel: str = "text-embedding-v4"
embeddingDim: int = 1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants